# encoding: utf-8



while True:
	s_char = input('请从键盘输入一行字符(退出按Q或q):')
	if s_char.strip().upper() == 'Q':
		break
	
	d = {'letter':0, 'number':0, 'space':0, 'other': 0}
	
	for c in s_char:
		if ord(c) in list(range(ord('a'), ord('z')+1)):
			d['letter'] += 1
		elif ord(c) in list(range(ord('A'), ord('Z')+1)):
			d['letter'] += 1
		elif c.isdigit():
			d['number'] += 1
		elif c == ' ':
			d['space'] +=1
		else:
			d['other'] +=1
	for k,v in d.items():
		print("{}:{}".format(k,v)) 
	
	
		
	